home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
...taking it to the Macs!
/
...taking it to the Macs!.iso
/
Extras
/
ActiveX Mac SDK
/
ActiveX SDK
/
Common
/
CXBindCtx.h
< prev
next >
Wrap
Text File
|
1997-01-03
|
2KB
|
59 lines
//
// XBINDCTX.H
//
// Copyright (C) Microsoft Corporation, 1996
//
typedef struct _XOBJECTPARAM {
struct _XOBJECTPARAM *pNextParam;
LPUNKNOWN punkObject;
OLECHAR key[1]; // OLECHAR key[ANYSIZE_ARRAY]
} XOBJECTPARAM, * LPXOBJECTPARAM;
class CXBindCtx:
public IBindCtx
{
private:
ULONG m_cRef;
BIND_OPTS m_bindopts;
LPXOBJECTPARAM m_pParamList;
public:
inline CXBindCtx();
~CXBindCtx();
// *** IUnknown methods ***
STDMETHOD(QueryInterface)(REFIID riid, LPVOID *ppvObj);
STDMETHOD_(ULONG, AddRef)(void);
STDMETHOD_(ULONG, Release)(void);
// *** IBindCtx methods ***
STDMETHOD(RegisterObjectBound)(LPUNKNOWN punk);
STDMETHOD(RevokeObjectBound)(LPUNKNOWN punk);
STDMETHOD(ReleaseBoundObjects)(void);
STDMETHOD(SetBindOptions)(LPBIND_OPTS pbindopts);
STDMETHOD(GetBindOptions)(LPBIND_OPTS pbindopts);
STDMETHOD(GetRunningObjectTable)(LPRUNNINGOBJECTTABLE *pprot);
STDMETHOD(RegisterObjectParam)(LPOLESTR pszKey, LPUNKNOWN punk);
STDMETHOD(GetObjectParam)(LPOLESTR pszKey, LPUNKNOWN *ppunk);
STDMETHOD(EnumObjectParam)(LPENUMSTRING *ppenum);
STDMETHOD(RevokeObjectParam)(LPOLESTR pszKey);
private:
BOOL Lookup(LPOLESTR pszKey, LPXOBJECTPARAM *ppParam, BOOL fRemove);
};
inline
CXBindCtx::CXBindCtx()
{
// Our implementation of the "new" operator will zero the structure so we
// don't have to explicitly zero/null anything.
m_cRef = 1;
m_bindopts.cbStruct = sizeof(m_bindopts);
m_bindopts.grfFlags = 0;
m_bindopts.grfMode = STGM_READWRITE;
m_bindopts.dwTickCountDeadline = 0;
m_pParamList = NULL;
}